home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / f90 / shiftr.z / shiftr
Text File  |  1998-10-30  |  3KB  |  73 lines

  1. SHIFTR(3I)                                             Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      SSHHIIFFTTRR - Performs a right shift with zero fill
  6.  
  7. SSYYNNOOPPSSIISS
  8.      SSHHIIFFTTRR (([II==]_i,,[JJ==]_j))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS, UNICOS/mk, and IRIX systems
  12.  
  13. SSTTAANNDDAARRDDSS
  14.      CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
  15.  
  16. DDEESSCCRRIIPPTTIIOONN
  17.      The SSHHIIFFTTRR intrinsic function performs a right shift with zero fill of
  18.      the _i by _j bits.  It accepts the following arguments:
  19.  
  20.      _i    The value to be shifted.  _i can be of type Boolean, integer,
  21.           real, or Cray pointer.
  22.  
  23.      _j    The number of bits to shift the value.  Must be of type integer
  24.           or Boolean.  _j must be within the range 0 <= _j <=_s_i_z_e, where _s_i_z_e
  25.           is the size, in bits, of _i.  That is, if _i is a 64-bit object, _j
  26.           must be within the range 0 <= _j <= 64.
  27.  
  28.      On UNICOS systems, an object is 64 bits.  On UNICOS/mk systems, an
  29.      object is 32 bits or 64 bits.  On IRIX systems, an object is 8 bits,
  30.      16 bits, 32 bits, or 64 bits.
  31.  
  32.      SSHHIIFFTTRR is an elemental function.  The name of this intrinsic cannot be
  33.      passed as an argument.
  34.  
  35. NNOOTTEESS
  36.      This is an outmoded routine.  Refer to the _F_o_r_t_r_a_n _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e
  37.      _M_a_n_u_a_l, _V_o_l_u_m_e _2, publication SR-3903, for information about outmoded
  38.      features and their preferred standard alternatives.
  39.  
  40.      The bit representation of the logical data type is not consistent
  41.      among Cray Research systems.  For further details, see your compiler's
  42.      reference manuals.
  43.  
  44. RREETTUURRNN VVAALLUUEESS
  45.      SSHHIIFFTTRR returns a value of type Boolean on UNICOS and UNICOS/mk
  46.      systems.  It returns an integer result on IRIX systems.
  47.  
  48. EEXXAAMMPPLLEESS
  49.      The following section of Fortran code shows the SSHHIIFFTTRR function used
  50.      in the case where _i is of type integer.  The bit pattern of _i and the
  51.      bit pattern of the result are also given.  For simplicity, a 16-bit
  52.      object is used.
  53.  
  54.           INTEGER I1, I2, I3
  55.           ...
  56.           I2 = 5
  57.           I3 = SHIFTR(I1,I2)
  58.  
  59.            ---------------------------------------------------------------
  60.           | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
  61.            ---------------------------------------------------------------
  62.                                        I1 (_i)
  63.  
  64.            ---------------------------------------------------------------
  65.           | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 |
  66.            ---------------------------------------------------------------
  67.                                        I3 (result)
  68.  
  69. SSEEEE AALLSSOO
  70.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
  71.      printed version of this man page.
  72.  
  73.